/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "fiscal_par_impostos")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FiscalParImpostos.findAll", query = "SELECT f FROM FiscalParImpostos f")})
public class FiscalParImpostos implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    private Integer codigo;
    @Column(length = 20)
    private String sigla;
    @Column(length = 100)
    private String nome;
    private Character competencia;
    private Character periodicidade;
    private Character tipo;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "BASE_CALCULO", precision = 18, scale = 6)
    private BigDecimal baseCalculo;
    @Column(precision = 18, scale = 6)
    private BigDecimal aliquota;
    @Column(name = "COMPENSA_PIS", precision = 18, scale = 6)
    private BigDecimal compensaPis;
    @Column(name = "COMPENSA_COFINS", precision = 18, scale = 6)
    private BigDecimal compensaCofins;
    @Column(name = "COMPENSA_CSOC", precision = 18, scale = 6)
    private BigDecimal compensaCsoc;
    @Column(name = "COMPENSA_IRPJ", precision = 18, scale = 6)
    private BigDecimal compensaIrpj;
    @JoinColumn(name = "ID_FISCAL_PARAMETROS", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private FiscalParametros idFiscalParametros;

    public FiscalParImpostos() {
    }

    public FiscalParImpostos(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCodigo() {
        return codigo;
    }

    public void setCodigo(Integer codigo) {
        this.codigo = codigo;
    }

    public String getSigla() {
        return sigla;
    }

    public void setSigla(String sigla) {
        this.sigla = sigla;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public Character getCompetencia() {
        return competencia;
    }

    public void setCompetencia(Character competencia) {
        this.competencia = competencia;
    }

    public Character getPeriodicidade() {
        return periodicidade;
    }

    public void setPeriodicidade(Character periodicidade) {
        this.periodicidade = periodicidade;
    }

    public Character getTipo() {
        return tipo;
    }

    public void setTipo(Character tipo) {
        this.tipo = tipo;
    }

    public BigDecimal getBaseCalculo() {
        return baseCalculo;
    }

    public void setBaseCalculo(BigDecimal baseCalculo) {
        this.baseCalculo = baseCalculo;
    }

    public BigDecimal getAliquota() {
        return aliquota;
    }

    public void setAliquota(BigDecimal aliquota) {
        this.aliquota = aliquota;
    }

    public BigDecimal getCompensaPis() {
        return compensaPis;
    }

    public void setCompensaPis(BigDecimal compensaPis) {
        this.compensaPis = compensaPis;
    }

    public BigDecimal getCompensaCofins() {
        return compensaCofins;
    }

    public void setCompensaCofins(BigDecimal compensaCofins) {
        this.compensaCofins = compensaCofins;
    }

    public BigDecimal getCompensaCsoc() {
        return compensaCsoc;
    }

    public void setCompensaCsoc(BigDecimal compensaCsoc) {
        this.compensaCsoc = compensaCsoc;
    }

    public BigDecimal getCompensaIrpj() {
        return compensaIrpj;
    }

    public void setCompensaIrpj(BigDecimal compensaIrpj) {
        this.compensaIrpj = compensaIrpj;
    }

    public FiscalParametros getIdFiscalParametros() {
        return idFiscalParametros;
    }

    public void setIdFiscalParametros(FiscalParametros idFiscalParametros) {
        this.idFiscalParametros = idFiscalParametros;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FiscalParImpostos)) {
            return false;
        }
        FiscalParImpostos other = (FiscalParImpostos) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.FiscalParImpostos[ id=" + id + " ]";
    }
    
}
